import java.util.Objects;
abstract class Data {
    abstract public void DisplayValue();
}
class Byte extends Data {
    byte value1;
    byte value2;
    Byte() {
        value1=52;
        value2=12;
    }
    public void DisplayValue(){
        System.out.println (value1);
        System.out.println (value2);
    }
}
// Pattern Classes
abstract class Factory {
    abstract public Data CreateDataObject();
}
class ByteFactory extends Factory {
    public Data CreateDataObject(){
        return new Byte();
    }
}
//Client classes
class Document {
    Data data;
    Document(Factory factory){
        data = factory.CreateDataObject();
    }
    public void DisplayData(){
        data.DisplayValue();

    }
}
public class MyDoc {
    static Document d;
    MyDoc(Document d) {
        this.d = d;
    }
    public static void main(String[] args) {
        d = new Document(new ByteFactory());
        d.DisplayData();
    }
}
